home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_02
/
2n02057a
< prev
next >
Wrap
Text File
|
1989-12-31
|
1KB
|
42 lines
/* ---------------------------------------------------
TESTPFHT.C - Microsoft C ver 5.1
A driver used to validate the assembly language
function process_handles_free().
From the command line, executing this program
will print the following line.
free handles: [15]
When executed under Microsoft CodeView ver 2.2,
this program will print the following line
free handles: [11]
since CodeView has taken four PFHT entries for
its own use.
Further proof of the function can be obtained
by opening one or more files, calling the
function to check the free handles, and then
closing one file at a time. After each close,
call the function. The free handle count will
increase with each close.
Commands to produce an executable from the code as
shown in the listings:
masm pfht; (listing 3)
cl -c testpfht.c (listing 4)
link testpfht pfht;
-------------------------------------------------- */
#include <stdio.h>
#include <stdlib.h> /* for _psp definition */
main()
{
extern int process_handles_free();
printf("free handles: [%d]\n", process_handles_free());
}